import {NgModule} from '@angular/core';

import {SharedModule} from '@shared/shared.module';
import {RouteRoutingModule} from './routes-routing.module';
// dashboard pages
import {DashboardV1Component} from './dashboard/v1/v1.component';
import {DashboardAnalysisComponent} from './dashboard/analysis/analysis.component';
import {DashboardMonitorComponent} from './dashboard/monitor/monitor.component';
import {DashboardWorkplaceComponent} from './dashboard/workplace/workplace.component';
// passport pages
import {UserLoginComponent} from './passport/login/login.component';
import {UserRegisterComponent} from './passport/register/register.component';
import {UserRegisterResultComponent} from './passport/register-result/register-result.component';
// single pages
import {CallbackComponent} from './callback/callback.component';
import {Exception403Component} from './exception/403.component';
import {Exception404Component} from './exception/404.component';
import {Exception500Component} from './exception/500.component';
import {UEditorModule} from 'ngx-ueditor';
import {HeadNavComponent} from '../layout/head-nav/head-nav.component';
// import {GeneralUserComponent} from './pages/general-user/general-user.component';
import {RegisterStep1Component} from './passport/register/register-step1.component';
import {RegisterStep3Component} from './passport/register/register-step3.component';
import {RegisterStep2Component} from './passport/register/register-step2.component';
import {RegisterStepFormComponent} from './passport/register/register-step-form.component';
import {HomeComponent} from './_home/home.component';
import {MemberCenterComponent} from './member-center/member-center.component';
import {UploadComponent} from './member-center/upload/upload.component';
import {AclDirective} from "../directive/acl.directive";
import {AlainACLModule} from "@delon/acl";

const COMPONENTS_REGROUNT = [ RegisterStep1Component, RegisterStep2Component, RegisterStep3Component ];
@NgModule({
    imports: [SharedModule, RouteRoutingModule,
        UEditorModule.forRoot({
            // **注：** 建议使用本地路径；以下为了减少 ng-alain 脚手架的包体大小引用了CDN，可能会有部分功能受影响
            // 指定ueditor.js路径目录
            path: 'assets/ueditor/',
            // 默认全局配置项
            options: {
                themePath: 'assets/ueditor/themes/'
            }
        }),
        AlainACLModule.forRoot()

    ],
    declarations: [
        MemberCenterComponent,

        DashboardV1Component,
        DashboardAnalysisComponent,
        DashboardMonitorComponent,
        DashboardWorkplaceComponent,
        // passport pages
        UserLoginComponent,
        UserRegisterComponent,
        UserRegisterResultComponent,
        // single pages
        CallbackComponent,
        Exception403Component,
        Exception404Component,
        Exception500Component,
        RegisterStepFormComponent,
        ...COMPONENTS_REGROUNT,
        HomeComponent,
        UploadComponent,
        AclDirective
    ],
    entryComponents: COMPONENTS_REGROUNT
})

export class RoutesModule {
}
